|
PHP
Super Counter 1.02 :: Installing and using the script
|
||||||||||||
|
||||||||||||
|
First off all thank you for downloading this script, before you install this script make sure you have the latest version. This PHP script is freeware. Therefore no guarantee on support or even functionality can be given. However feel free to contact me if you experience problems using this script. |
||||||||||||
|
Before you start installing there are a few things you should know:
|
||||||||||||
|
The first step for using this script is to create the needed tables in your MySql database, for this i have included a file called sc_install.php this file contains the SQL statements to create the needed tables. In order to execute the needed commands, upload this file to your site and execute it. After you have succesfully created the tables and data make sure you remove this script before proceeding. Alternatly if you are using phpMyAdmin or a simulair product to maintain your database then you can choose to select the file scounter.sql for execution. The tables will then automaticly be created. If you are updating from version 1.00 you can execute the following SQL statement instead of executing the entire maketables.php file: CREATE TABLE `SC_STATS` ( When the tables are created you need to configure the counter by editing the file sc_config.php: For the 'host' setting you can usualy suffice with LocalHost, the username and password require valid login credetials for your database. This user must already exist offcourse :) The database name is the name given to your database. (make sure all settings use correct caps.. mypassword is not the same as MyPassword)
The showicon setting is used to display the supercounter icon on the page your counting the hits from. The password settings is used in the clear counter script. (see below) The colors are optional but you can change them. (this is used on the stats page.) The reload delay can be adjusted to count more or less hits from the same ip.
The tablenames are default, if you change these then make sure they reflect the names that you imported into your database!
The file sc_clear.php is for resetting the counters, if you dont want this option then dont upload the file. If you do want it then you need to edit the settings in this file. The setting $Password is somthing you can choose yourself to make sure noone can reset your counters without your permission. So set it to a password of your choice before uploading. Thats
it! If you imported the sql script and edited the config file as mentioned
then all configuration is done and everything should be ready for usage!
If you are
using a static IP address then you can block it from the counter by
adding the ip address to the SC_BLOCKIPS table. All IP's entered in
that table will be ignored by the counter.
|
||||||||||||
|
The Super Counter can count for multiple pages at once, it updates the 'global' counter and also the specific page counter. If you want a page to be counted when hit then enter the following line of code into your HTML file: <?php include "sc_addhit.php"; ?> This makes the script log the hit and displays the counter icon. (note that the ALT text in the icon gives you information on the counters action taken. If you wish to display information from the counter on your page then you always need to include the following tag: <?php include "sc_information.php"; ?> Once thats done the functions inside the script are available for use, the following information require the following tag:
More statistics can be found by accessing the page sc_stats.php If you wish clear the counters (after testing for instance) then you can upload and call the file sc_clear.php |
||||||||||||
|
|
||||||||||||